<template>
    <div class="TipBlock" ref="TipBlock">
        <div class="closeBtn" @click="closeModule">
            <i class="icon njfont nj-shibai"></i>
        </div>
        <div class="logoAIntro">
            <img src="static/image/downloadLogo.png" class="DLLOGO"/>
            <div class="brief">
                <p style="color:#EFEFEF;">打开宁家鲜生商城购物</p>
                <p style="color:#727272;">宁家鲜生，美好生活！</p>
            </div>
        </div>
        <div class="downloadBtn" @click="toDownload">
            点击打开
        </div>
    </div>
</template>

<script>
    import { openApp } from '../../utils/ZWY/utils.js'
    export default {
        data () {
            return {

            }
        },
        components: {},
        props: {
            goApp: {
                default: () => {}
            }
        },
        methods:{
            toDownload() {
                this.goApp()
                // location.href = location.href.split('H5')[0] + 'download/index.html';
                // console.log(location.href.split('H5')[0] + 'download/index.html');
            },
            closeModule() {
                this.$refs.TipBlock.style.display = 'none';
            }
        }
    }
</script>

<style>
    .TipBlock{
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        height: 2.5rem;
        background: #232323;
    }
    .DLLOGO{
        width:1.8rem;
        border-radius: .2rem;
    }
    .downloadBtn{
        width: 30%;
        height: 100%;
        background: #CD2525;
        text-align: center;
        line-height: 2.5rem;
        color: white;
    }
    .closeBtn{
        color: #AAAAAA;
        width: 10%;
        text-align: center;
    }
    .closeBtn i{
        width: 100%;
        font-size: .85rem;
    }
    .logoAIntro{
        width: 57%;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }
    .logoAIntro p{
        text-align: left;
        padding: 0;
        font-size: .65rem;
    }
    .brief{
        margin-left: .4rem;
    }
</style>
